package com.zys.exercise;

import java.util.ArrayList;

public class text4 {
    public static void main(String[] args) {
        ArrayList<user> list = new ArrayList<>();
        user u1 = new user("123","sff","sf");
        list.add(u1);
        String a = new String("123");
        String a2 = new String("123");

        System.out.println(a.equals(a2));


        System.out.println(search(list, "123"));

    }
    public static boolean search(ArrayList<user> list,String id){
        return list.contains(id);

    }
}
